package per.ethan.javase.java8.lambda;

import java.util.Comparator;

/**
 * @author Ethan
 * @date 2020/04/27 11:20
 */
public class Demo1 {

    public static void main(String[] args) {
        LambdaDemo lambdaTest = name -> System.out.println("hello: " + name);

        lambdaTest.hello("zhangsan");

        Comparator<Integer> comparator = Integer::compare;

        System.out.println(comparator.compare(10, 10));
    }

}

@FunctionalInterface
interface LambdaDemo {
    void hello(String name);
}